import {INCREMENT,DECREMENT} from "../constents/countConst"
import store from "../store"

export const incrementAction =(data=1)=>{
    return {
        type:INCREMENT,
        data
    }
}

export const decrementAction =(data=1)=>{
    return {
        type:DECREMENT,
        data
    }

}

export const waitIncrementAction =(data=1)=>{
    return ()=>{
        setTimeout(() => {
          return store.dispatch({
            type:INCREMENT,
            data
        })
        
        }, 2000);
    }

}